﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Models;

namespace BLL
{
    /// <summary>
    /// 支付方式
    /// </summary>
   public class payBLL
    {
        //支付方式查询
        public static DataTable selectPayBll()
        {
            return payDAL.selectPay();
        }
        //查询数据条数
        public static object paydataNumBll()
        {
            return payDAL.dataNum();
        }
        //支付方式添加
        public static bool payAddBLL(string name) {
            return payDAL.payAdd(name)>0;
        }
        //支付方式添加判断重复
        public static object payCFBll(string name) {
            return payDAL.payCF(name);
        }
        //支付方式修改
        public static bool updatePayBLL(Pay p) {
            return payDAL.updatePay(p) > 0;
        }
        //支付方式查询
        public static DataTable payCXBll(string name) {
            return payDAL.payCX(name);
        }
        //支付方式删除
        public static int deleteBLL(int id) {
            return payDAL.delete(id);
        }
        //下拉框
        public static List<Pay> liXlkBLL() {
            return payDAL.liXlk();
        }
        //支付判断重复
        public static object orderPay(string bh) {
            return payDAL.orderPay(bh);
        }
    }
}
